package com.yixing.demo.service;

import com.yixing.demo.mapper.LoveMusicMapper;
import com.yixing.demo.model.LoveMusic;
import com.yixing.demo.model.Music;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LoveMusicService {
    @Autowired
    LoveMusicMapper loveMusicMapper;

    public LoveMusic inspectMusicByDoubleId(Integer userId, Integer musicId) {
        return loveMusicMapper.inspectMusicByDoubleId(userId, musicId);
    }

    public Integer increaseLoveMusic(Integer userId, Integer musicId) {
        return loveMusicMapper.increaseLoveMusic(userId, musicId);
    }

    public List<Music> seekLoveMusicByNoTitle(Integer userId) {
        return loveMusicMapper.seekLoveMusicByNoTitle(userId);
    }

    public List<Music> seekLoveMusicByTitle(Integer userId, String title) {
        return loveMusicMapper.seekLoveMusicByTitle(userId, title);
    }

    public Integer deleteLoveMusic(Integer userId, Integer musicId) {
        return loveMusicMapper.deleteLoveMusic(userId, musicId);
    }
}
